Executes the specified delegate asynchronously with the specified arguments, on the thread that the control's underlying handle was created on.
Syntax
| Visual Basic (Declaration) | |
|---|
Public Overloads Function BeginInvoke( _
ByVal method As System.Delegate, _
ByVal ParamArray args() As System.Object _
) As System.IAsyncResult |
| C# | |
|---|
public System.IAsyncResult BeginInvoke(
System.Delegate method,
params System.object[] args
) |
Parameters
- method
- A delegate to a method that takes parameters of the same number and type that are contained in the args parameter.
- args
- An array of objects to pass as arguments to the given method. This can be null if no arguments are needed.
Return Value
An
System.IAsyncResult that represents the result of the
System.Windows.Forms.Control.BeginInvoke(System.Delegate) operation.
Exceptions
| Exception | Description |
| System.InvalidOperationException | No appropriate window handle can be found. |
Requirements
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
See Also